Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-0 vector-toc-not-available vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-0 vector-feature-night-mode-enabled skin-theme-clientpref-os vector-sticky-header-enabled" lang="fr" dir="ltr"><head>
<meta charset="UTF-8">
<title>Query by Example</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="./_res_/favicon.png">
<link rel="canonical" href="https://fr.wikipedia.org/wiki/Query_by_Example"> <link href="./_mw_/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.wikimediamessages.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./_mw_/site.styles.css">
<link rel="stylesheet" type="text/css" href="./_mw_/noscript.css">
<link rel="stylesheet" type="text/css" href="./_res_/footer.css">
<link rel="stylesheet" type="text/css" href="./_res_/vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Query_by_Example rootpage-Query_by_Example skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">Query by Example</span></h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="contentSub">
<div id="mw-content-subtitle"></div>
</div>
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="fr" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="fr" dir="ltr">
<p><b><span class="lang-en" lang="en">Query by Example</span></b> (abrégé <b>QBE</b>, en français <i>interrogation par l'exemple</i>), est un type d'<a href="Interface_graphique" title="Interface graphique">interface utilisateur</a> servant à effectuer des recherches dans des <a href="Bases_de_donn%C3%A9es_relationnelles" class="mw-redirect" title="Bases de données relationnelles">bases de données relationnelles</a>. Le principe d'une interface QBE est que l'utilisateur présente un <i>exemple</i> du résultat de recherche attendu - sous forme d'une matrice, puis le soumet au <a href="SGBD" class="mw-redirect" title="SGBD">SGBD</a>. Celui-ci recherchera alors toutes les données qui correspondent à cet exemple. Les tables de la base de données sont présentées à l'écran, et l'utilisateur peut les manipuler en vue de créer l'exemple<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup><sup class="reference cite_virgule">,</sup><sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup>.
</p><p>QBE a été inventé par Moshe Zloof pour le compte de <a href="International_Business_Machines" class="mw-redirect" title="International Business Machines">IBM</a>, en <a href="1977" title="1977">1977</a>.
</p>

<div class="mw-heading mw-heading2"><h2 id="Particularités"><span id="Particularit.C3.A9s"></span>Particularités</h2></div>
<p>Avec ce système le résultat prime sur les moyens de mise en œuvre. Avec QBE, il ne s'agit pas, pour l'utilisateur, ni le développeur, d'apprendre un langage de requêtes, mais tout simplement de définir une image de la réponse que l'on veut obtenir, pour voir figurer les données répondant à l'interrogation demandée.
</p><p>Il a été inventé par Moshe Zloof pour le compte de la compagnie IBM, en <a href="1977" title="1977">1977</a>. Commercialisé à partir de <a href="1978" title="1978">1978</a>, il a connu un certain succès grâce à son introduction au sein de la première version de <a href="Paradox_(base_de_donn%C3%A9es)" title="Paradox (base de données)">Paradox</a> (1.0 pour DOS) en <a href="1985" title="1985">1985</a>.
</p><p>QBE est dès l'origine un langage relationnel complet intégrant la division relationnelle, opération décrite dans l'algèbre relationnelle de <a href="Edgar_Frank_Codd" title="Edgar Frank Codd">Codd</a> qui n'est toujours pas présente de manière simple dans les plus récentes normes SQL (SQL:2003). En revanche QBE ne permet pas la récursivité dans les requêtes, alors que la version normative SQL:1999 le permet.
</p>
<div class="mw-heading mw-heading2"><h2 id="Exemple">Exemple</h2></div>
<p>Voici un exemple de requête QBE et son équivalent SQL&nbsp;:
</p>
<div class="mw-heading mw-heading3"><h3 id="Requête_QBE"><span id="Requ.C3.AAte_QBE"></span>Requête QBE</h3></div>
<pre>== T_CLIENT_CLI ===== CLI_NUM ============= CLI_NOM ===
| Check _join1! | Check |
| | |

== T_COMMANDE_CDE ===== CLI_NUM =========== CDE_DATE ================= CDE_MONTANT ===
| _join1 | ≥ 2000-01-01, ≤2000-03-31 | SOMME &lt; 10000 |
| | | |
</pre>
<div class="mw-heading mw-heading3"><h3 id="Requête_SQL"><span id="Requ.C3.AAte_SQL"></span>Requête SQL</h3></div>
<div class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><pre><span></span><span class="w"> </span><span class="k">SELECT</span><span class="w"> </span><span class="n">CDE</span><span class="p">.</span><span class="n">CLI_NUM</span><span class="p">,</span><span class="w"> </span><span class="n">CLI_NOM</span>
<span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">T_CLIENT_CLI</span><span class="w"> </span><span class="n">CLI</span>
<span class="w"> </span><span class="k">LEFT</span><span class="w"> </span><span class="k">OUTER</span><span class="w"> </span><span class="k">JOIN</span><span class="w"> </span><span class="n">T_COMMANDE_CDE</span><span class="w"> </span><span class="n">CDE</span>
<span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="n">CLI</span><span class="p">.</span><span class="n">CLI_NUM</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">CDE</span><span class="p">.</span><span class="n">CLI_NUM</span>
<span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">CDE_DATE</span><span class="w"> </span><span class="k">BETWEEN</span><span class="w"> </span><span class="nb">DATE</span><span class="s1">'2000-01-01'</span><span class="w"> </span><span class="k">AND</span><span class="w"> </span><span class="s1">'2000-03-31'</span>
<span class="w"> </span><span class="k">GROUP</span><span class="w"> </span><span class="k">BY</span><span class="w"> </span><span class="n">CDE</span><span class="p">.</span><span class="n">CLI_NUM</span><span class="p">,</span><span class="w"> </span><span class="n">CLI_NOM</span>
<span class="w"> </span><span class="k">HAVING</span><span class="w"> </span><span class="k">SUM</span><span class="p">(</span><span class="n">CDE_MONTANT</span><span class="p">)</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">10000</span>
</pre></div>
<div class="mw-heading mw-heading2"><h2 id="Disponibilité"><span id="Disponibilit.C3.A9"></span>Disponibilité</h2></div>
<p>Les <a href="SGBD" class="mw-redirect" title="SGBD">systèmes de gestion de base de données</a> suivant mettent à disposition une interface QBE&nbsp;:
</p>
<ul><li><a href="Ashton-Tate" title="Ashton-Tate">Ashton-Tate</a> <a href="DBase" title="DBase">dBase</a></li>
<li><a href="Corel" title="Corel">Corel</a> <a href="Paradox_(base_de_donn%C3%A9es)" title="Paradox (base de données)">Paradox</a></li>
<li><a href="Microsoft_Access" title="Microsoft Access">Microsoft Access</a></li>
<li><a href="FileMaker" class="mw-redirect" title="FileMaker">FileMaker</a></li>
<li><a href="Kexi" title="Kexi">Kexi</a></li>
<li><a href="OpenOffice.org_Base" class="mw-redirect" title="OpenOffice.org Base">OpenOffice.org Base</a></li>
<li><a href="LibreOffice" title="LibreOffice">LibreOffice Base</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="Notes_et_références"><span id="Notes_et_r.C3.A9f.C3.A9rences"></span>Notes et références</h2></div>
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><a href="#cite_ref-1">↑</a> </span><span class="reference-text"><span class="ouvrage" id="AriavClifford1986"><span class="ouvrage" id="Gad_AriavJames_Clifford1986"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> Gad <span class="nom_auteur">Ariav</span> et James <span class="nom_auteur">Clifford</span>, <cite class="italique" lang="en">New directions for database systems</cite>, Norwood, Ablex Pub. Corp., <abbr class="abbr" title="collection">coll.</abbr>&nbsp;«&nbsp;Computer-based information systems in organizations&nbsp;», <time>1986</time>, 269&nbsp;<abbr class="abbr" title="pages">p.</abbr> <small style="line-height:1em;">(<a href="International_Standard_Book_Number" title="International Standard Book Number">ISBN</a>&nbsp;<span class="nowrap">978-0-893-91344-1</span>, <a href="Online_Computer_Library_Center" title="Online Computer Library Center">OCLC</a>&nbsp;<span class=" noarchive nowrap"><a rel="nofollow" class="external text" href="https://worldcat.org/fr/title/13063674">13063674</a></span>)</small><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=New+directions+for+database+systems&amp;rft.place=Norwood&amp;rft.pub=Ablex+Pub.+Corp.&amp;rft.aulast=Ariav&amp;rft.aufirst=Gad&amp;rft.au=Clifford%2C+James&amp;rft.date=1986&amp;rft.tpages=269&amp;rft.isbn=978-0-893-91344-1&amp;rft_id=info%3Aoclcnum%2F13063674&amp;rfr_id=info%3Asid%2Ffr.wikipedia.org%3AQuery+by+Example"></span></span></span></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><a href="#cite_ref-2">↑</a> </span><span class="reference-text"><span class="ouvrage" id="VassiliouVassiliou1984"><span class="ouvrage" id="Yannis_VassiliouYannis_Vassiliou1984"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> Yannis <span class="nom_auteur">Vassiliou</span> et Yannis <span class="nom_auteur">Vassiliou</span>, <cite class="italique" lang="en">Human factors and interactive computer systems proceedings of the NYU Symposium on User Interfaces</cite>, Norwood, Ablex Publishing Corporation, <abbr class="abbr" title="collection">coll.</abbr>&nbsp;«&nbsp;Human/computer interaction&nbsp;», <time>1984</time>, 287&nbsp;<abbr class="abbr" title="pages">p.</abbr> <small style="line-height:1em;">(<a href="International_Standard_Book_Number" title="International Standard Book Number">ISBN</a>&nbsp;<span class="nowrap">978-0-893-91182-9</span>, <a href="Online_Computer_Library_Center" title="Online Computer Library Center">OCLC</a>&nbsp;<span class=" noarchive nowrap"><a rel="nofollow" class="external text" href="https://worldcat.org/fr/title/492861019">492861019</a></span>)</small><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Human+factors+and+interactive+computer+systems+proceedings+of+the+NYU+Symposium+on+User+Interfaces&amp;rft.place=Norwood&amp;rft.pub=Ablex+Publishing+Corporation&amp;rft.aulast=Vassiliou&amp;rft.aufirst=Yannis&amp;rft.au=Vassiliou%2C+Yannis&amp;rft.date=1984&amp;rft.tpages=287&amp;rft.isbn=978-0-893-91182-9&amp;rft_id=info%3Aoclcnum%2F492861019&amp;rfr_id=info%3Asid%2Ffr.wikipedia.org%3AQuery+by+Example"></span></span></span></span>
</li>
</ol></div>
<div class="mw-heading mw-heading2"><h2 id="Voir_aussi">Voir aussi</h2></div>
<div class="mw-heading mw-heading3"><h3 id="Liens_externes">Liens externes</h3></div>
<ul><li><a rel="nofollow" class="external text" href="http://sqlpro.developpez.com/cours/qbe/?page=sommaire">Les requêtes QBE en long en large et en travers</a></li>
<li><a rel="nofollow" class="external text" href="http://pages.cs.wisc.edu/~dbbook/openAccess/thirdEdition/qbe.pdf">Syntaxe de QBE et des opérateurs relationnels</a></li></ul>
<ul id="bandeau-portail" class="bandeau-portail"><li><span class="bandeau-portail-element"><span class="bandeau-portail-icone"><span class="noviewer" typeof="mw:File"></span></span> <span class="bandeau-portail-texte">Portail de la programmation informatique</span> </span></li> <li><span class="bandeau-portail-element"><span class="bandeau-portail-icone"><span class="noviewer" typeof="mw:File"></span></span> <span class="bandeau-portail-texte">Portail des bases de données</span> </span></li> </ul></div><!--htdig_noindex--><div><div class="zim-footer">
Cet article est issu de <a class="external text" title="Dernière modification le 2024-01-09" href="https://fr.wikipedia.org/wiki/?title=Query_by_Example&amp;oldid=211335245">Wikipédia</a>. Sauf mention contraire, le texte est disponible sous <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.fr">Creative Commons Attribution-Share Alike 4.0</a>. Des conditions supplémentaires peuvent s’appliquer aux fichiers multimédias.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
<script src="./_webp_/webpHandler.js"></script>

</body></html>